Optimal. Leaf size=207 \[ -\frac {2}{81} b^2 e n^2 r x^3+\frac {2}{81} b e n (3 a-b n) r x^3-\frac {1}{81} e \left (9 a^2-6 a b n+2 b^2 n^2\right ) r x^3+\frac {2}{27} b^2 e n r x^3 \log \left (c x^n\right )-\frac {2}{27} b e (3 a-b n) r x^3 \log \left (c x^n\right )-\frac {1}{9} b^2 e r x^3 \log ^2\left (c x^n\right )+\frac {2}{27} b^2 n^2 x^3 \left (d+e \log \left (f x^r\right )\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 207, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {2342, 2341,
2413, 12, 14} \begin {gather*} -\frac {1}{81} e r x^3 \left (9 a^2-6 a b n+2 b^2 n^2\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )-\frac {2}{27} b e r x^3 (3 a-b n) \log \left (c x^n\right )+\frac {2}{81} b e n r x^3 (3 a-b n)-\frac {1}{9} b^2 e r x^3 \log ^2\left (c x^n\right )+\frac {2}{27} b^2 e n r x^3 \log \left (c x^n\right )+\frac {2}{27} b^2 n^2 x^3 \left (d+e \log \left (f x^r\right )\right )-\frac {2}{81} b^2 e n^2 r x^3 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 2341
Rule 2342
Rule 2413
Rubi steps
\begin {align*} \int x^2 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right ) \, dx &=\frac {2}{27} b^2 n^2 x^3 \left (d+e \log \left (f x^r\right )\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )-(e r) \int \frac {1}{27} x^2 \left (2 b^2 n^2-6 b n \left (a+b \log \left (c x^n\right )\right )+9 \left (a+b \log \left (c x^n\right )\right )^2\right ) \, dx\\ &=\frac {2}{27} b^2 n^2 x^3 \left (d+e \log \left (f x^r\right )\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )-\frac {1}{27} (e r) \int x^2 \left (2 b^2 n^2-6 b n \left (a+b \log \left (c x^n\right )\right )+9 \left (a+b \log \left (c x^n\right )\right )^2\right ) \, dx\\ &=\frac {2}{27} b^2 n^2 x^3 \left (d+e \log \left (f x^r\right )\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )-\frac {1}{27} (e r) \int \left (\left (9 a^2-6 a b n+2 b^2 n^2\right ) x^2-6 b (-3 a+b n) x^2 \log \left (c x^n\right )+9 b^2 x^2 \log ^2\left (c x^n\right )\right ) \, dx\\ &=-\frac {1}{81} e \left (9 a^2-6 a b n+2 b^2 n^2\right ) r x^3+\frac {2}{27} b^2 n^2 x^3 \left (d+e \log \left (f x^r\right )\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )-\frac {1}{3} \left (b^2 e r\right ) \int x^2 \log ^2\left (c x^n\right ) \, dx-\frac {1}{9} (2 b e (3 a-b n) r) \int x^2 \log \left (c x^n\right ) \, dx\\ &=\frac {2}{81} b e n (3 a-b n) r x^3-\frac {1}{81} e \left (9 a^2-6 a b n+2 b^2 n^2\right ) r x^3-\frac {2}{27} b e (3 a-b n) r x^3 \log \left (c x^n\right )-\frac {1}{9} b^2 e r x^3 \log ^2\left (c x^n\right )+\frac {2}{27} b^2 n^2 x^3 \left (d+e \log \left (f x^r\right )\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )+\frac {1}{9} \left (2 b^2 e n r\right ) \int x^2 \log \left (c x^n\right ) \, dx\\ &=-\frac {2}{81} b^2 e n^2 r x^3+\frac {2}{81} b e n (3 a-b n) r x^3-\frac {1}{81} e \left (9 a^2-6 a b n+2 b^2 n^2\right ) r x^3+\frac {2}{27} b^2 e n r x^3 \log \left (c x^n\right )-\frac {2}{27} b e (3 a-b n) r x^3 \log \left (c x^n\right )-\frac {1}{9} b^2 e r x^3 \log ^2\left (c x^n\right )+\frac {2}{27} b^2 n^2 x^3 \left (d+e \log \left (f x^r\right )\right )-\frac {2}{9} b n x^3 \left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f x^r\right )\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 157, normalized size = 0.76 \begin {gather*} \frac {1}{27} x^3 \left (9 a^2 d-6 a b d n+2 b^2 d n^2-3 a^2 e r+4 a b e n r-2 b^2 e n^2 r+e \left (9 a^2-6 a b n+2 b^2 n^2\right ) \log \left (f x^r\right )+3 b^2 \log ^2\left (c x^n\right ) \left (3 d-e r+3 e \log \left (f x^r\right )\right )+2 b \log \left (c x^n\right ) \left (9 a d-3 b d n-3 a e r+2 b e n r+(9 a e-3 b e n) \log \left (f x^r\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.38, size = 9271, normalized size = 44.79
method | result | size |
risch | \(\text {Expression too large to display}\) | \(9271\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 256, normalized size = 1.24 \begin {gather*} \frac {1}{3} \, b^{2} d x^{3} \log \left (c x^{n}\right )^{2} - \frac {2}{9} \, a b d n x^{3} - \frac {1}{9} \, a^{2} r x^{3} e + \frac {2}{3} \, a b d x^{3} \log \left (c x^{n}\right ) + \frac {1}{3} \, a^{2} x^{3} e \log \left (f x^{r}\right ) + \frac {1}{3} \, a^{2} d x^{3} - \frac {1}{9} \, {\left (r x^{3} - 3 \, x^{3} \log \left (f x^{r}\right )\right )} b^{2} e \log \left (c x^{n}\right )^{2} + \frac {2}{27} \, {\left ({\left (2 \, r - 3 \, \log \left (f\right )\right )} x^{3} - 3 \, x^{3} \log \left (x^{r}\right )\right )} a b n e - \frac {2}{9} \, {\left (r x^{3} - 3 \, x^{3} \log \left (f x^{r}\right )\right )} a b e \log \left (c x^{n}\right ) + \frac {2}{27} \, {\left (n^{2} x^{3} - 3 \, n x^{3} \log \left (c x^{n}\right )\right )} b^{2} d - \frac {2}{27} \, {\left ({\left ({\left (r - \log \left (f\right )\right )} x^{3} - x^{3} \log \left (x^{r}\right )\right )} n^{2} - {\left ({\left (2 \, r - 3 \, \log \left (f\right )\right )} x^{3} - 3 \, x^{3} \log \left (x^{r}\right )\right )} n \log \left (c x^{n}\right )\right )} b^{2} e \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 407 vs.
\(2 (196) = 392\).
time = 0.36, size = 407, normalized size = 1.97 \begin {gather*} \frac {1}{3} \, b^{2} n^{2} r x^{3} e \log \left (x\right )^{3} - \frac {1}{27} \, {\left (2 \, b^{2} n^{2} - 4 \, a b n + 3 \, a^{2}\right )} r x^{3} e + \frac {1}{27} \, {\left (2 \, b^{2} d n^{2} - 6 \, a b d n + 9 \, a^{2} d\right )} x^{3} - \frac {1}{9} \, {\left (b^{2} r x^{3} e - 3 \, b^{2} d x^{3}\right )} \log \left (c\right )^{2} + \frac {1}{3} \, {\left (2 \, b^{2} n r x^{3} e \log \left (c\right ) + b^{2} n^{2} x^{3} e \log \left (f\right ) + b^{2} d n^{2} x^{3} - {\left (b^{2} n^{2} - 2 \, a b n\right )} r x^{3} e\right )} \log \left (x\right )^{2} + \frac {2}{27} \, {\left ({\left (2 \, b^{2} n - 3 \, a b\right )} r x^{3} e - 3 \, {\left (b^{2} d n - 3 \, a b d\right )} x^{3}\right )} \log \left (c\right ) + \frac {1}{27} \, {\left (9 \, b^{2} x^{3} e \log \left (c\right )^{2} - 6 \, {\left (b^{2} n - 3 \, a b\right )} x^{3} e \log \left (c\right ) + {\left (2 \, b^{2} n^{2} - 6 \, a b n + 9 \, a^{2}\right )} x^{3} e\right )} \log \left (f\right ) + \frac {1}{9} \, {\left (3 \, b^{2} r x^{3} e \log \left (c\right )^{2} + {\left (2 \, b^{2} n^{2} - 4 \, a b n + 3 \, a^{2}\right )} r x^{3} e - 2 \, {\left (b^{2} d n^{2} - 3 \, a b d n\right )} x^{3} + 2 \, {\left (3 \, b^{2} d n x^{3} - {\left (2 \, b^{2} n - 3 \, a b\right )} r x^{3} e\right )} \log \left (c\right ) + 2 \, {\left (3 \, b^{2} n x^{3} e \log \left (c\right ) - {\left (b^{2} n^{2} - 3 \, a b n\right )} x^{3} e\right )} \log \left (f\right )\right )} \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 5.38, size = 340, normalized size = 1.64 \begin {gather*} \frac {a^{2} d x^{3}}{3} - \frac {a^{2} e r x^{3}}{9} + \frac {a^{2} e x^{3} \log {\left (f x^{r} \right )}}{3} - \frac {2 a b d n x^{3}}{9} + \frac {2 a b d x^{3} \log {\left (c x^{n} \right )}}{3} + \frac {4 a b e n r x^{3}}{27} - \frac {2 a b e n x^{3} \log {\left (f x^{r} \right )}}{9} - \frac {2 a b e r x^{3} \log {\left (c x^{n} \right )}}{9} + \frac {2 a b e x^{3} \log {\left (c x^{n} \right )} \log {\left (f x^{r} \right )}}{3} + \frac {2 b^{2} d n^{2} x^{3}}{27} - \frac {2 b^{2} d n x^{3} \log {\left (c x^{n} \right )}}{9} + \frac {b^{2} d x^{3} \log {\left (c x^{n} \right )}^{2}}{3} - \frac {2 b^{2} e n^{2} r x^{3}}{27} + \frac {2 b^{2} e n^{2} x^{3} \log {\left (f x^{r} \right )}}{27} + \frac {4 b^{2} e n r x^{3} \log {\left (c x^{n} \right )}}{27} - \frac {2 b^{2} e n x^{3} \log {\left (c x^{n} \right )} \log {\left (f x^{r} \right )}}{9} - \frac {b^{2} e r x^{3} \log {\left (c x^{n} \right )}^{2}}{9} + \frac {b^{2} e x^{3} \log {\left (c x^{n} \right )}^{2} \log {\left (f x^{r} \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 506 vs.
\(2 (196) = 392\).
time = 5.41, size = 506, normalized size = 2.44 \begin {gather*} \frac {1}{3} \, b^{2} n^{2} r x^{3} e \log \left (x\right )^{3} - \frac {1}{3} \, b^{2} n^{2} r x^{3} e \log \left (x\right )^{2} + \frac {2}{3} \, b^{2} n r x^{3} e \log \left (c\right ) \log \left (x\right )^{2} + \frac {1}{3} \, b^{2} n^{2} x^{3} e \log \left (f\right ) \log \left (x\right )^{2} + \frac {2}{9} \, b^{2} n^{2} r x^{3} e \log \left (x\right ) - \frac {4}{9} \, b^{2} n r x^{3} e \log \left (c\right ) \log \left (x\right ) + \frac {1}{3} \, b^{2} r x^{3} e \log \left (c\right )^{2} \log \left (x\right ) - \frac {2}{9} \, b^{2} n^{2} x^{3} e \log \left (f\right ) \log \left (x\right ) + \frac {2}{3} \, b^{2} n x^{3} e \log \left (c\right ) \log \left (f\right ) \log \left (x\right ) + \frac {1}{3} \, b^{2} d n^{2} x^{3} \log \left (x\right )^{2} + \frac {2}{3} \, a b n r x^{3} e \log \left (x\right )^{2} - \frac {2}{27} \, b^{2} n^{2} r x^{3} e + \frac {4}{27} \, b^{2} n r x^{3} e \log \left (c\right ) - \frac {1}{9} \, b^{2} r x^{3} e \log \left (c\right )^{2} + \frac {2}{27} \, b^{2} n^{2} x^{3} e \log \left (f\right ) - \frac {2}{9} \, b^{2} n x^{3} e \log \left (c\right ) \log \left (f\right ) + \frac {1}{3} \, b^{2} x^{3} e \log \left (c\right )^{2} \log \left (f\right ) - \frac {2}{9} \, b^{2} d n^{2} x^{3} \log \left (x\right ) - \frac {4}{9} \, a b n r x^{3} e \log \left (x\right ) + \frac {2}{3} \, b^{2} d n x^{3} \log \left (c\right ) \log \left (x\right ) + \frac {2}{3} \, a b r x^{3} e \log \left (c\right ) \log \left (x\right ) + \frac {2}{3} \, a b n x^{3} e \log \left (f\right ) \log \left (x\right ) + \frac {2}{27} \, b^{2} d n^{2} x^{3} + \frac {4}{27} \, a b n r x^{3} e - \frac {2}{9} \, b^{2} d n x^{3} \log \left (c\right ) - \frac {2}{9} \, a b r x^{3} e \log \left (c\right ) + \frac {1}{3} \, b^{2} d x^{3} \log \left (c\right )^{2} - \frac {2}{9} \, a b n x^{3} e \log \left (f\right ) + \frac {2}{3} \, a b x^{3} e \log \left (c\right ) \log \left (f\right ) + \frac {2}{3} \, a b d n x^{3} \log \left (x\right ) + \frac {1}{3} \, a^{2} r x^{3} e \log \left (x\right ) - \frac {2}{9} \, a b d n x^{3} - \frac {1}{9} \, a^{2} r x^{3} e + \frac {2}{3} \, a b d x^{3} \log \left (c\right ) + \frac {1}{3} \, a^{2} x^{3} e \log \left (f\right ) + \frac {1}{3} \, a^{2} d x^{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.99, size = 189, normalized size = 0.91 \begin {gather*} \ln \left (f\,x^r\right )\,\left (\ln \left (c\,x^n\right )\,\left (\frac {2\,a\,b\,e\,x^3}{3}-\frac {2\,b^2\,e\,n\,x^3}{9}\right )+\frac {a^2\,e\,x^3}{3}+\frac {2\,b^2\,e\,n^2\,x^3}{27}+\frac {b^2\,e\,x^3\,{\ln \left (c\,x^n\right )}^2}{3}-\frac {2\,a\,b\,e\,n\,x^3}{9}\right )+x^3\,\left (\frac {a^2\,d}{3}+\frac {2\,b^2\,d\,n^2}{27}-\frac {a^2\,e\,r}{9}-\frac {2\,b^2\,e\,n^2\,r}{27}-\frac {2\,a\,b\,d\,n}{9}+\frac {4\,a\,b\,e\,n\,r}{27}\right )+\frac {b^2\,x^3\,{\ln \left (c\,x^n\right )}^2\,\left (3\,d-e\,r\right )}{9}+\frac {2\,b\,x^3\,\ln \left (c\,x^n\right )\,\left (9\,a\,d-3\,b\,d\,n-3\,a\,e\,r+2\,b\,e\,n\,r\right )}{27} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________